[TSAN] Rework assertions to always access refcount atomically
authorColin Walters <walters@verbum.org>
Thu, 17 Nov 2016 16:40:59 +0000 (11:40 -0500)
committerAtomic Bot <atomic-devel@projectatomic.io>
Thu, 17 Nov 2016 19:41:57 +0000 (19:41 +0000)
commitc1c70bceb7a77031cba2a4433e595b3e280f0bf8
treecce4e4568d142ccf20545dcf193bda4069d6644c
parentf0519e541f296fc277db636567bb0f0e4d9fc62d
[TSAN] Rework assertions to always access refcount atomically

`-fsanitize=address` complained that the `refcount > 0` assertions
were reading without atomics.  We can fix this by reworking them
to read the previous value.

Closes: #582
Approved by: jlebon
src/libostree/ostree-fetcher.c
src/libostree/ostree-repo-commit.c
src/libostree/ostree-repo.c